<%@page contentType="text/html;charset=UTF-8"%>
<%
	String path = request.getContextPath();
	response.setHeader("Cache-Control", "no-cache"); //HTTP 1.1 
	response.setHeader("Pragma", "no-cache"); //HTTP 1.0 
	response.setDateHeader("Expires", 0);

	String skin = "default";
	String imgPath = request.getContextPath() + "/resources/skins/"
			+ skin + "/images";
	String login_code=request.getParameter("login_code");
	if(login_code==null)login_code="";
	String password=request.getParameter("password");
	if(password==null)password="";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>企助之星登陆</title>
		<style type="text/css">
		<!--
		body {margin: 0px; background:url(<%=imgPath%>/index/f.gif) repeat; font-size:12px;}
		input,form{ margin:0 auto;}
		.left{ float:left;}
		.right{ float:right;}
		.LoginBox{ margin:140px auto 0 auto; width:320px; height:111px; background:url(<%=imgPath%>/index/login_bg.png) no-repeat; padding:70px 0; color:#fff; position:relative;}
		.LoginInput{ margin-left:40px;height:86px;}
		.login_input{height:21px; width:147px; line-height:21px; background:url(<%=imgPath%>/index/login_input.gif) no-repeat; border:none; padding-left:5px; margin-top:5px;}
		.yanzheng{ width:57px; height:21px;  line-height:21px;  background:url(<%=imgPath%>/index/yanzheng.gif) no-repeat; border:none;padding-left:5px; }
		.LoginButtom{ margin-top:40px; text-align:center;}
		.LoginButtom img{ margin: 0 10px;}
		.LoginBox span{width:147px;	height:175px;	display:block;	background:url(<%=imgPath%>/index/login_icon.png) no-repeat;position:absolute;left: 282px;	top: 79px;}
		
		
		-->
		</style>
		<script type="text/javascript" src="<%=path%>/resources/js/jquery-1.4.4.min.js"></script>
		<script type="text/javascript"
			src="<%=path%>/resources/js/jquery.form.js"></script>
		<script type="text/javascript">
			var disp = function(){
				var flag = "failure";
				var options = {
					type: 'POST',
					async: false,
					dataType: 'json',
					success: function(data) {
						if(data.status=="failure"){
							if(data.code=="lcodeerror"){
								alert("用户名错误！");
							}else if(data.code=="nosite"){
								alert("该用户还没有自己的网站！");
							}
						}else{
							window.location="http://"+data.url+"/sys/get/login?login_code="+$("#login_code").val();
						}
					}
				}
				$('#dispatchfrm').ajaxSubmit(options);
				return flag;
			}
			var keyup = function(e){
				if(e.keyCode == 13){
					disp();
				}
			}
		</script>
	</head>

<body onkeyup="keyup(event)">
<form action="<%=path%>/sys/dispatch" name="dispatchfrm" id="dispatchfrm"
	method="post">
<div class="LoginBox">
	<div class="LoginInput">
		请输入您的用户名进入您的站点后台！<br/><br/>
	      用户名：<input type="text" name="login_code" id="login_code" value="<%=login_code %>" class="login_input" /><br />
  		  <div style="clear: both;"></div>
    </div>
    <div class="LoginButtom" >
		<a href="#" onclick="disp()"><img src="<%=imgPath%>/index/denglu.gif" width="66" height="23" border="0" /></a>
	</div>
    <span></span>
</div>
</form> 
<script> 
	document.getElementById("login_code").buler;
</script>
</body>
</html>